package com.hx.zhg.service.system;

import com.hx.zhg.service.system.vo.JSSDKConfigVo;

/**
 * Created by zhenghegong on 2020/4/19.
 */
public interface WxSystemService {

    /**
     * 获取TOKEN
     *
     * @return ACCESS_TOKEN JSON
     * @throws Exception
     */
    String getAccessToken() throws Exception;

    /**
     * 刷新ACCESS_TOKEN
     *
     * @return ACCESS_TOKEN
     * @throws Exception
     */
    String flushAccessToken() throws Exception;

    /**
     * 获取缓存ACCESS_TOKEN
     *
     * @return
     * @throws Exception
     */
    String getCacheAccessToken() throws Exception;

    /**
     * 校验TOKEN
     *
     * @param signature
     * @param timestamp
     * @param nonce
     * @return
     * @throws Exception
     */
    boolean checkSignature(String signature, String timestamp, String nonce) throws Exception;

    /**
     * 要访问的URL
     *
     * @param url
     * @return
     * @throws Exception
     */
    JSSDKConfigVo getJSSDKConfig(String url) throws Exception;

}
